/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.hotel.visitor;

import java.security.Principal;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

/**
 *
 * @author haind
 */
@Controller
public class Index {
//    @RequestMapping(method = RequestMethod.GET, value = "/index")
//    public ModelAndView prepareComponent(HttpServletRequest request, HttpServletResponse response)
//    {
//        System.out.println("goes here");
//        ModelAndView model = new ModelAndView("login/index.jsp");
//        return model;
//    }
    @RequestMapping(value = "/index", method = RequestMethod.GET)
    public ModelAndView prepareComponent(HttpServletRequest request, HttpServletResponse response)
    {
        System.out.println("-----------------vai lua----------------");
        ModelAndView model = new org.springframework.web.servlet.ModelAndView("guest/index");
        return model;
    }
}

//